//
//  ZBCache.h
//  ZBDay
//
//  Created by xzb on 2018/2/25.
//  Copyright © 2018年 xzb. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ZBCache : NSObject

+ (instancetype)instance;

- (void)clearCache;

- (void)setData:(NSData *)data forKey:(NSString *)cacheKey;

- (NSData *)dataForKey:(NSString *)cacheKey;

- (BOOL)containsObjectForKey:(NSString *)key;

- (void)removeObjectForKey:(NSString *)key;

- (void)removeAllObjects;

#pragma mark - other API
//app安装之后只运行一次
+ (void)onceEventForKey:(NSString *)key event:(void(^)(void))event;

@end
